Skip to main content

keysDown

Type

function

Summary

Returns a list of the keys currently being pressed.

Syntax

the keysDown
keysDown()

Description

Use the keysDown function to respond to a keypress while a handler is being executed.

The keycodes returned by the keysDown function are the same as those passed as parameters with the rawKeyDown and rawKeyUp messages.

The keysDown function returns empty if no keys are being pressed.

Examples

the keysDown
if myKey is in the keysDown then exit to top

control structure: function

function: shiftKey, altKey, capsLockKey, optionKey, commandKey, controlKey

glossary: return, keycode, handler, execute, pass, message, parameter

message: rawKeyUp, keyUp, rawKeyDown, keyDown, controlKeyDown

Compatibility and Support

Introduced

LiveCode 1.1

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?